package 设计模式.l_责任链模式;

import cn.hutool.log.StaticLog;

/**
 * @author caihe
 * @date 2023/3/13 16:00
 */
public class StudentHandler implements RequestHandler {
    @Override
    public boolean canHandleRequest(Request req) {
        return RequestType.STUDY.equals(req.getRequestType());
    }

    @Override
    public int getPriority() {
        return 3;
    }

    @Override
    public void handle(Request req) {
        StaticLog.info("{} 请求被 {} 处理", req.getRequestDesc(), name()) ;
    }

    @Override
    public String name() {
        return "学生";
    }
}
